package org.ruslan.kolobok;

import org.ruslan.kolobok.screen.MainMenuScreen;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.FPSLogger;


public class Kolobok extends Game {
	
    // a libgdx helper class that logs the current FPS each second
    private FPSLogger fpsLogger;

	@Override
	public void create () {
		Settings.load();
		Assets.load();
		
		fpsLogger = new FPSLogger();
		setScreen(new MainMenuScreen(this));
	}

	/**
		* {@link Game#dispose()} only calls {@link Screen#hide()} so you need to override
		* {@link Game#dispose()} in order to call {@link Screen#dispose()} on each of your
		* screens which still need to dispose of their resources.
		* Kolobok doesn't actually have such resources so this is only to complete the
		* example.
		*/
	@Override
	public void dispose () {
		super.dispose();

		getScreen().dispose();
	}
	
	@Override
	public void render() {
		super.render();
		
        // output the current FPS
        fpsLogger.log();
	}
}
